/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication5;

import java.util.Scanner;
import javax.sound.midi.ShortMessage;

/**
 *
 * @author alexey
 */
public class JavaApplication5 {

    static private int programNumber;

    public static void main(String[] args) {
        System.out.println("Введите номер программы:");
        Scanner scanner = new Scanner(System.in);
        programNumber = scanner.nextInt();
        float x = 1;
        int a = 0;

        switch (programNumber) {
            case 1:
                System.out.println("Введите число:");
                x = scanner.nextInt();
                int b = 1;

                for (int i = 0; i < 8; i++) {
                    for (int j = 0; j < b; j++) {
                        x = x * x;
                    }
                    b++;
                }

                x = x / 8;

                System.out.print(x);
                break;
            case 2:
                System.out.println("Введите число:");
                x = scanner.nextInt();
                
                for (int i = 0; i < 150; i++){
                    a = a + i;
                }
                
                a = (int) (a * x);

                System.out.println(Integer.toString(a));
                break;
            default:
                break;
        }
    }

}
